package ru.lukyanets.transmission;

import org.junit.jupiter.api.Test;

import java.util.Map;
import java.util.TreeMap;

/**
 * @author slukyanets
 */
public class DummyTest {

    @Test
    public void shiftTest() {

        Map<A, String> map = new TreeMap<>();

        map.put(new A(1), "1");
        map.put(new A(2), "2");
        map.put(new A(3), "3");
        map.put(new A(4), "4");

        map.forEach((key, val) -> System.out.println(key.value + " - " + val));
    }

    public static final class A implements Comparable<A> {
        int value;

        public A(int value) {
            this.value = value;
        }

        @Override
        public int compareTo(A o) {
            return Integer.compare(value, o.value);
        }
    }
}
